<?php
class Macys_Base_Globals {

	/**
	 * Logging variable
	 */
	private $log;
	private $sessionInfo;

	public function __construct() {
		$this->log = Zend_Registry::get('log');
		$this->sessionInfo = new Macys_Base_Session();
	}





	/*
	 * Retrive Config Values
	 */
	public function getConfigValues($key) {
		$iniValues = null;
		try {
			$iniVals = Zend_Registry::get('Macys');
			if (!is_null($key)) {
				$iniValues = $iniVals[$key];
			}
		}
		catch (Macys_Base_Exception $e) {
			$this->log->crit('Exception Occured : ' . $e->getMessages());
		}
		$this->log->debug('Retrived key : '. $key . ', and Values : ' . $iniValues);
		return $iniValues;
	}

	/**
	 * Wrapper for Session Data Management of this Class
	 * Stores / Retrives the Session Data
	 * @param string $key
	 * @param Mixed $data
	 */
	public function sessionData($namespace , $key, $data=null) {
		return $this->sessionInfo->sessionData($namespace, $key, $data);
	}

	public function sessionUnset($namespace) {
		$this->sessionInfo->sessionUnset($namespace);
		return $this;
	}


}